home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Video Toaster 4.3
/
Video Toaster v4.3.iso
/
4.2
/
arexx
/
editor
/
unmaxav.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1998-04-16
|
3KB
|
103 lines
/* UnMax.rexx V3.0 -- Put in and out points in a bit. */
/* By Bob Caron (Grue) ©1995 NewTek Inc. */
arg frompopup
if frompopup="" then frompopup=0
call remlib('PROJECT_REXX_PORT')
call addlib('PROJECT_REXX_PORT',0)
call set_view(2)
call req_error("UnMax Length V3.0 --- Sets in and out points of video and audio croutons 1 second in.")
done=0
do while done=0
selection=req_tell("UnMax Length V3.0","'Continue' to effect ALL croutons","'Cancel' to effect selected croutons")
done=1
if selection=0 & frompopup=0 then do
if req_tell("Error:","You can only use this feature if you","launch this script from the tools","popup menu.")=0 then call quit()
done=0
end
end
if selection=1 then frompopup=0 else frompopup=1
project_end=croutonsinproject()
location=1
do count=1 to project_end
if croutonselectedpos(count)=1 | frompopup=0 then do
selected.location=count-1
location=location+1
end
end
location=location-1
vidin=0;vidout=0;audin=0;audout=0;done=-1
buttons='1111'
do while done=-1
buttons=req_buttons("What would you like to effect:",buttons,"Vid In","Vid Out","AudIn","AudOut")
if buttons="CANCEL" then call quit
if substr(buttons,1,1)="1" then do
vidin=1; done=1
end
if substr(buttons,2,1)="1" then do
vidout=1; done=1
end
if substr(buttons,3,1)="1" then do
audin=1; done=1
end
if substr(buttons,4,1)="1" then do
audout=1; done=1
end
end
if frompopup="0" then do
if req_tell("Change ALL In and Out points"," Are You Sure?")=0 then call quit()
end
else
if req_tell("Change Selected In and Out points"," Are You Sure?")=0 then call quit()
extravid=0
extraaud=0
call req_open("Working... Please wait.")
chunk=100/location;last=0;dots=0
do count=1 to location
if crnumtype(selected.count)="CLIP" | crnumtype(selected.count)=" AUD" then do
fields=crnumgettag(selected.count,RecFields)
if fields<120 then break
out=fields-120
in=60
if vidin=1 then call crnumsettag(selected.count,ClipStartField,in)
if audin=1 then call crnumsettag(selected.count,AudioStart,in)
if vidout=1 then call crnumsettag(selected.count,Duration,out)
if audout=1 then call crnumsettag(selected.count,AudioDuration,out)
end
last=trunc(dots/10)+1
dots=dots+chunk;string=copies(".",trunc(dots/10)+1)
if (last~=trunc(dots/10)+1) then do
if (11-length(string)>-1) then
call req_error("[Working"||string||right(' ',11-length(string))||"]")
end
end
call req_close()
call req_error("All done.")
call projectupdate()
call remlib("PROJECT_REXX_PORT")
exit
quit:
call req_error("Canceled.")
call remlib("PROJECT_REXX_PORT")
exit
croutonselectedpos:
arg pos
row=trunc(pos/8)
col=pos-(row*8)
row=row+1
return croutonselected(row,col)